package cn.ailanyin.home.common.utils;

import cn.ailanyin.home.module.things.dto.ThingsDTO;
import cn.ailanyin.home.module.things.entity.Things;

/**
 * @author 小怪兽
 * @version 1.0
 * @date 2024/4/14 0014 13:03:09
 */
public class EntityUtil {
    /**
     * 转型
     *
     * @param dto dto
     * @return {@link Things}
     */
    public static Things getThings(ThingsDTO dto) {
        Things things = new Things();
        things.setId(dto.getId());
        things.setName(dto.getName());
        things.setCount(dto.getCount());
        things.setImgUrls(dto.getImgUrls());
        things.setCategoryId(dto.getCategoryId());
        things.setCupboardId(dto.getCupboardId());
        return things;
    }
}
